﻿@model GSLMS.Entity.TB_SYS_SURVEYTMPSET
@{
    Layout = null;


    var systemdataList = ViewData["SystemDataList"] as SelectList;
    var surveyTypeDataList = ViewData["surveyTypeDataList"] as SelectList;
    var index = 0;
}
<div class="pageContent">
    <form method="post" action="System/SurveyTmpSet/Create/?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone);">
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model=>model.ID)
    <div class="pageFormContent" layouth="78">
        <p>
            <label>
                调查报告名称</label>
            @Html.TextBoxFor(model=>model.SURVEYNAME, new { @class = "required" })
           
        </p>
        <p>
            <label>
                调查报告类别:</label>
           @Html.DropDownList("SURVEYTYPE", surveyTypeDataList, new { @class = "required", @selectedvalue = Model.SURVEYTYPE })
        </p>
        <p>
            <label>
                对应系统:</label>
           @Html.DropDownList("SYSTEMID", systemdataList, new { @class = "required", @selectedvalue = Model.SYSTEMID})
        </p>
        <p>
            <label>
                建档人:</label>
            @Html.TextBoxFor(model => model.CREATEBY)
        </p>
        <p>
            <label>
               建档时间：</label>
           @Html.TextBoxFor(model=>model.CREATEDATE)
        </p>
        <div class="divider" />
                    <table class="list nowrap itemDetail" addbutton="其他说明栏-新建行" width="90%">
                        <thead>
                            <tr>
                                <th type="text" name="DetailList[#index#].SORTNO"  style = "width:45px"   fieldclass="required"  >
                                    序号
                                </th>
                                <th type="text" name="DetailList[#index#].TMPITEMNAME" style = "width:300px" size="48"   fieldclass="required">
                                    名称
                                </th>
                                <th type="enum"  name="DetailList[#index#].TMPTYPE" style = "width:300px" size="48" enumurl="System/SurveyTmpSet/TMPTYPE/">
                                    对应栏
                                 
                                </th>
                                <th type="del" width="10%">
                                    操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (var item in Model.DetailList)
                            { 
                                <tr>
                                    <td>@Html.TextBox("DetailList["+index.ToString()+"].SORTNO", item.SORTNO, new { @style = "width:45px" })
                                    </td>
                                    <td>@Html.TextBox("DetailList[" + index.ToString() + "].TMPITEMNAME", item.TMPITEMNAME, new { @style = "width:300px;",@size="48" })
                                    </td>
                                    <td>
                                        <select class="combox" name='@("DetailList[" + index + "].TMPTYPE")' style="width:300px;" size="48">
                                            <option value="0"  @(item.TMPTYPE == 0 ? "selected='selected'" : "")>--请选择--</option>
                                            <option value="1"  @(item.TMPTYPE == 1 ? "selected='selected'" : "")>客户情况综合认定</option>
                                            <option value="2"  @(item.TMPTYPE == 2 ? "selected='selected'" : "")>项目情况综合认定</option>
                                        </select>
                                    </td>
                                     <th width="10%">
                                          <a href="javascript:void(0)" class="btnDel">删除</a>
                                     </th>
                                </tr>
                                index++;
                            }
                        </tbody>
                    </table>
                    <div class="divider" />
    </div>
      @Html.Partial("FormButtonBar")
    </form>
</div>
